﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Os.Domain.Equipamento>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	.: Equipamentos :.
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Equipamentos</h2>
    
    <table>
        <tr>
            <th></th>
            <th>
                Data
            </th>
            <th>
                Descrição
            </th>
            <th>
                Marca
            </th>
            <th>
                Modelo
            </th>
            <th>
                S.O.
            </th>
            <th>
                Localização
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Editar", "Editar", new {  id=item.IdEquipamento }) %> |
                <%= Html.ActionLink("Detalhes", "Detalhes", new {  id=item.IdEquipamento })%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:dd/MM/yyyy}", item.Data)) %>
            </td>
            <td>
                <%= Html.Encode(item.Descricao) %>
            </td>
            <td>
                <%= Html.Encode(item.Marca) %>
            </td>
            <td>
                <%= Html.Encode(item.Modelo) %>
            </td>
            <td>
                <%= Html.Encode(item.So) %>
            </td>
            <td>
                <%= Html.Encode(item.Localizacao) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Novo Equipamento", "Novo") %>
    </p>

</asp:Content>

